Skip to content

Fix TTL for watch calls on replay#147

Merged
galt-tr merged 1 commit into
mainfrom
propagationReplay
May 13, 2026
Merged

Fix TTL for watch calls on replay#147
galt-tr merged 1 commit into
mainfrom
propagationReplay

Conversation

@galt-tr
Copy link
Copy Markdown
Contributor

@galt-tr galt-tr commented May 13, 2026

This pull request implements a set of improvements and fixes for the merkle-service registration replay logic, primarily to address inefficiencies and unnecessary load during startup (issue #145). The changes add new configuration options to control replay behavior, update defaults for better performance, and ensure that successfully registered transactions are tracked to avoid redundant work. The PR also includes comprehensive tests to validate the new logic.

Key changes:

Replay Logic Improvements

  • Added new configuration fields in PropagationConfig (merkle_replay_skip_recent_minutes, merkle_replay_rps) to control skipping recently registered transactions and rate-limiting replay requests. Updated the default replay lookback window from 7 days to 24 hours and documented the rationale for these changes. [1] [2] [3]
  • Modified the replay logic to skip transactions that were recently registered with merkle-service, using the new MerkleRegisteredAt timestamp on each transaction. This prevents redundant /watch calls on restart. [1] [2] [3]

Marking and Tracking Registrations

  • Implemented MarkMerkleRegisteredByTxIDs in the store interface and its mocks to record the time of successful merkle-service registrations. This allows the replay loop to efficiently skip already-registered transactions. [1] [2] [3]

Testing Enhancements

  • Added extensive unit tests for the new replay logic, including tests for skipping recently registered transactions, honoring the lookback window, rate-limiting, and marking only successful registrations. Tests also verify that marking failures do not block further processing. [1] [2]

Workflow Automation

  • Introduced a new GitHub Actions workflow (.github/workflows/add-issues-to-project.yml) to automatically add new issues to the organization's project board for better triage and planning.

Fixes #145

@galt-tr galt-tr requested a review from mrz1836 as a code owner May 13, 2026 20:34
@github-actions github-actions Bot added bug-P3 Lowest rated bug, affects nearly none or low-impact size/XL Very large change (>500 lines) labels May 13, 2026
@galt-tr galt-tr merged commit 4e6d1f3 into main May 13, 2026
40 checks passed
@galt-tr galt-tr deleted the propagationReplay branch May 13, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-P3 Lowest rated bug, affects nearly none or low-impact size/XL Very large change (>500 lines)

Projects

None yet

2 participants